#pragma once


// CEditColor

class CEditColor : public CEdit
{
        DECLARE_DYNAMIC(CEditColor)

    protected:
        DECLARE_MESSAGE_MAP()

    public:
        CEditColor();
        virtual ~CEditColor();

        afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/);

        void SetTextColor(COLORREF);
        void SetBackground(COLORREF);
        void SetColorsDefault();
        void SetBold(bool enable=true);

        void SetIsALink(bool bl = true);

        void SetLink(const CString&);

    private:
        COLORREF m_clrText;
        COLORREF m_clrBkgnd;
        CBrush  m_brBkgnd;
        bool  mb_islink;
        CFont  m_font;
        HCURSOR  m_hand_cursor;
        bool  m_bMouseOver;

        CString  m_link;

        afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);

    public:
        afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
};


